package com.lc.mybatis.mapper;

import com.lc.mybatis.pojo.User;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SelectMapper {

    //根据id查询用户
    User getUserById(@Param("id")Integer id);

    //查询所有用户
    List<User> getAllUser();

    //查询总共数据
    Integer getAllCount();

    @MapKey("id")
    Map<String,Object> getUserToMoHu(@Param("mohu") String mohu);

    @MapKey("id")
//    List<Map<String,Object>> getAllUserToMap();
    Map<String,Object> getAllUserToMap();
}
